/*
 * @Author: c.k
 * @文件说明: 请求错误处理函数,统一拦截器过滤
 */
import fToast from "../tool/fToast";
import store from "../store/index";
import md5 from 'js-md5';

const version  = "4.3.3";

let signature =(data,_type=1) => {
  
  let _auth_key='';
    if(_type){
      // _auth_key=store.getters.getuser_auth_key;
      _auth_key="";
    }
    let _key='xckj@#*&%&*%2018F#%jfkHUYDhe990';
    let nowDate=(+new Date()).toString().substring(0,10);
    let hash=md5(_auth_key+''+nowDate+''+_key);
    data['access_time']=nowDate;
    data['access_key']=hash;
    data['auth_key']=_auth_key;
    data['version']=version;
    return data;
};
export {
  signature
};